use std::process;
use structopt::StructOpt;

use utils::hotcure_logger::HotCureLogger;

use hotcure_ctl::hotcure_parse_opts::Opts;
use hotcure_ctl::hotcure_process::run;

fn main() {
    HotCureLogger::new("hotcure-ctl", log::LevelFilter::Info);

    let opts = Opts::from_args();

    let e = match run(opts) {
        Err(it) => it,
        _ => return,
    };
    println!("Error: {:?}", e);
    process::exit(1);
}
